#include <stdio.h>
#include <linux/input.h>
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>           
#include <sys/socket.h>
#include <arpa/inet.h>
#include <strings.h>
#include <pthread.h>
#include <sys/select.h>


#define HI_NULL                 0L
#define HI_SUCCESS              0
#define HI_FAILURE              (-1)



typedef enum {
	CAMERA_NONE = 0,
	CAMERA_IDLE,
	CAMERA_PREVIEW,
	CAMERA_PHOTO,
	CAMERA_RECORD_START,
	CAMERA_RECORD_STOP,
	CAMERA_PHOTO_JPEG_RAW,
	CAMERA_VIEW_SHOT,
	CAMERA_MODE_MAX,
}CAMERA_EVENT;

typedef enum {
	CAMERA_24FPS = 0,
	CAMERA_25FPS,
    CAMERA_30FPS,
	CAMERA_FPS_MAX,
}CAMERA_FPS;

typedef enum {
	CAMERA_H264_SIZE_720P = 0,
	CAMERA_H264_SIZE_1080P,
	CAMERA_H264_SIZE_MAX,
}CAMERA_H264_SIZE;

typedef enum {
	CAMERA_H264_BITRATE_1M = 0,
	CAMERA_H264_BITRATE_2M,
    CAMERA_H264_BITRATE_4M,
	CAMERA_H264_BITRATE_MAX,
}CAMERA_H264_BITRATE;

typedef enum {
    CAMERA_PHOTO_SIZE_2M = 0,
    CAMERA_PHOTO_SIZE_8M,
	CAMERA_PHOTO_SIZE_12M,
	CAMERA_PHOTO_SIZE_26M,
    CAMERA_PHOTO_SIZE_61M,
	CAMERA_PHOTO_SIZE_MAX,
}CAMERA_PHOTO_SIZE;